﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Themes/MasterPage.master" AutoEventWireup="true" CodeFile="MounterMaintenance.aspx.cs" Inherits="UserPower_MounterMaintenance" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="TabTitle" Runat="Server">
    贴片机信息维护
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" Runat="Server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
<div style =" height:20px">
</div>
 <fieldset >
   <legend >查询条件</legend>
   <div>
   <table width ="100%" >
   <tr>
   <td  style=" height:30px">
  </td>
   </tr>
   <tr>
   <td>
       <asp:UpdatePanel ID="UpdatePanel2" runat="server">
       <ContentTemplate>
   <table width="100%">
   <tr>
   <td>
   <div style=" float:left">
     <asp:RadioButton ID="RType" runat="server" AutoPostBack="True" Checked="True" 
           oncheckedchanged="RType_CheckedChanged" />
   <font size="2">型号</font>
   </div>
   </td>
   <td>
   <div style="float:left">
       <asp:TextBox ID="TextBoxMachineType" runat="server" AutoCompleteType="Disabled"></asp:TextBox>
   </div>
   </td>
    <td><div style=" float:left">
        <asp:RadioButton ID="RAbility" runat="server" AutoPostBack="True" 
            oncheckedchanged="RAbility_CheckedChanged" />
      <font size="2">能力</font>
      </div>
      </td>
    <td>
      <div style="float:left">
        <asp:TextBox ID="TextBoxAbility" runat="server"></asp:TextBox>
      </div>
    </td>
    <td>
    <div style=" float:left">
        <asp:RadioButton ID="RParameter" runat="server" AutoPostBack="True" 
            oncheckedchanged="RParameter_CheckedChanged" />
    <font size="2">参数</font>
    </div>
    </td>
    <td>
     <div style="float:left">
      <asp:TextBox ID="TextBoxParameter" runat="server"></asp:TextBox>
     </div>
    </td>
   </tr>
      <tr>
   <td>
   <div style=" float:left">
       <asp:RadioButton ID="RPeople" runat="server" AutoPostBack="True" 
           oncheckedchanged="RPeople_CheckedChanged" />
       <font size="2">维护人</font>
       </div>
       </td>
   <td>
     <div style="float:left">
       <asp:TextBox ID="TextBoxMaintenancer" runat="server"></asp:TextBox>
     </div>
    </td>
    <td>
    <div style=" float:left">
        <asp:RadioButton ID="RTime" runat="server" AutoPostBack="True" 
            oncheckedchanged="RTime_CheckedChanged" />
        <font size="2">维护时间</font>
        </div>
        </td>
    <td>
       <div style="float:left">
       <asp:TextBox ID="TextBoxMaintenanceTime" runat="server"></asp:TextBox>
       </div>
     </td>
    <td>
   </td>
     <td>
   </td>
   </tr>
      </table>
      </ContentTemplate>
       </asp:UpdatePanel>
    </td>
   </tr>
   <tr>
   <td>
       <asp:UpdatePanel ID="UpdatePanel3" runat="server">
       <ContentTemplate>
   <table align="center" width="20%">
   <tr>
   <td>
   <asp:Button ID="ButtonSearch" runat="server" Text="查询" 
           onclick="ButtonSearch_Click" />
   </td>
     <td>
         <input id="ButtonAddNew" type="button" class="buttonbgYellow" value="新建" onfocus="this.blur()" onclick="javascript:window.open('../Common/AddMounterMaintenance.aspx','','width=800,height=150,top=200,left=250,toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no')" /></td>
     <td>
   <asp:Button ID="ButtonALL" runat="server" Text="全部显示" 
             onclick="ButtonALL_Click" />
       </td>
   </tr>
   </table>
    </td>
   </tr>
   </table>
   </ContentTemplate>
       </asp:UpdatePanel>
    </div>
     </fieldset>
     <div>
     <table width="100%">
     <tr>
     <td>
         <asp:UpdatePanel ID="UpdatePanel1" runat="server">
         <ContentTemplate>
            <asp:GridView ID="GridviewMounterMaintenance" runat="server" PageSize="5" 
                AllowPaging="True" 
                onpageindexchanging="GridviewMounterMaintenance_PageIndexChanging" 
                onrowdatabound="GridviewMounterMaintenance_RowDataBound" 
                DataKeyNames="MounterID" 
                onrowdeleting="GridviewMounterMaintenance_RowDeleting" >
                <Columns>
                    <asp:BoundField HeaderText="型号" DataField="MounterType" />
                   <asp:BoundField HeaderText="能力" DataField="MounterAbility" />
                    <asp:BoundField HeaderText="参数" DataField="MounterParameter" />
                    <asp:BoundField HeaderText="维护人" DataField="MounterMaintenancer" />
                    <asp:BoundField HeaderText="维护时间" DataField="MounterMaintenanceTime"  DataFormatString="{0:yyyy-MM-dd}"/>
                    <asp:TemplateField HeaderText="修改">
                    <ItemTemplate>
                     <a href="#" onfocus="this.blur()" onclick="javascript:window.open('../Common/UpdateMounterParameter.aspx?MounterID=<%#Eval("MounterID") %>','','width=800,height=150,top=200,left=250,toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no')"><font color="blue">修改</font></a>
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" />
                </asp:TemplateField>
                    <asp:CommandField ShowDeleteButton="True" EditText="修改" HeaderText="删除" />
                </Columns>
                <PagerSettings Mode="NextPreviousFirstLast" FirstPageText="首页   " 
                    LastPageText="最后一页" NextPageText="下一页   " PreviousPageText="上一页   " />
                <PagerStyle Font-Size="Large" HorizontalAlign="Center" />
                <PagerTemplate>
                    <asp:LinkButton ID="lbFirst" runat="server" CausesValidation="False" 
                        CommandArgument="First" CommandName="Page">首页 </asp:LinkButton>
                    <asp:LinkButton ID="lbPrev" runat="server" CausesValidation="False" 
                        CommandArgument="Prev" CommandName="Page">上一页 </asp:LinkButton>
                    <asp:LinkButton ID="lbNext" runat="server" CausesValidation="False" 
                        CommandArgument="Next" CommandName="Page">下一页 </asp:LinkButton>
                    <asp:LinkButton ID="lbLast" runat="server" CausesValidation="False" 
                        CommandArgument="Last" CommandName="Page">尾页 </asp:LinkButton>
                    第 
                    <asp:Label ID="Lbcurrent" runat="server" 
                        Text=" <%#((GridView)Container.Parent.Parent).PageIndex + 1 %>"> 
            </asp:Label>
                    页 共 
                    <asp:Label ID="Lbcount" runat="server" 
                        Text=" <%# ((GridView)Container.Parent.Parent).PageCount %>"> 
                </asp:Label>
                    页
                </PagerTemplate>
            </asp:GridView>
            </ContentTemplate>
         </asp:UpdatePanel>
     </td>
     </tr>
     <tr>
     <td  style=" height:20px">&nbsp;</td>
     </tr>
     </table>
     </div>
    <script type="text/javascript">
        function ISEmpty() {
            var type = document.getElementById('<%=TextBoxMachineType.ClientID %>');
            if (type.value == "") {
                alert("查询条件不能为空！");
                return false;
            }
        
        }
    
    </script>
     </div>

     </div>


</asp:Content>